<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.js" ></script>
	</head>
	<body ng-app="checkList" ng-controller="checkController">
		<label><input  type="checkbox" ng-click="checkAll()" ng-model="all" /> 全选</label>
		 <div ng-repeat="c in cartList">  
                <td class="checkbox"><input  type="checkbox" ng-model="c.check" /></td>  
            </div> 
          <script>
          	var app=angular.module("checkList",[]);
          	app.controller('checkController',function($scope){
          		
	         		  $scope.checkAll=function(){
	            for(var i in $scope.cartList){  
	                 $scope.cartList[i].check=$scope.all;  
	            }  
	        }  
	       $scope.cartList=[{
	        id:0,  
	        image:"images/1.jpg",  
	        name:"Casio/卡西欧 EX-TR350",  
	        price:5999.88,  
	        num:1,  
	        total:5999.88  
	    },  
	    {     
	        id:1,  
	        image:"images/2.jpg",  
	        name:"Canon/佳能 PowerShot SX50 HS",  
	        price:3888.50,  
	        num:1,  
	        total:3888.50  
	    },  
	    {     
	        id:2,  
	        image:"images/3.jpg",  
	        name:"Sony/索尼 DSC-WX300",  
	        price:1428.50,  
	        num:1,  
	        total:1428.50  
	    },  
	    {     
	        id:3,  
	        image:"images/4.jpg",  
	        name:"Fujifilm/富士 instax mini 25",  
	        price:640.60,  
	        num:1,  
	        total:640.60  
	    }]  
	  
          </script>
	</body>
</html>
